@import 'antd/dist/antd.css';

body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
    'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}

#root {
  height: 100%;
}

/* 竖向滚动条样式 */
.scrollY {
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 5px;
    height: 100%;
    background-color: transparent;
  }

  /*
  *滚动条的轨道
  */
  &::-webkit-scrollbar-track {
    background-color: transparent;
    border-radius: 2px;
  }

  /*
  滚动条的滑块按钮
  */
  &::-webkit-scrollbar-thumb {
    background-color: #eee;
    border-radius: 2px;
    box-shadow: inset 0 0 5px #eee;
  }

  /*
  滚动条的上下两端的按钮
  */
  &::-webkit-scrollbar-button {
    height: 0;
    background-color: transparent;
  }
}

/* 横向滚动条样式 */
.scrollX {
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: auto;
    height: 5px;
    background-color: transparent;
  }

  /*
  *滚动条的轨道
  */
  &::-webkit-scrollbar-track {
    background-color: transparent;
    border-radius: 2px;
  }

  /*
  滚动条的滑块按钮
  */
  &::-webkit-scrollbar-thumb {
    background-color: #eee;
    border-radius: 2px;
    box-shadow: inset 0 0 5px #eee;
  }

  /*
  滚动条的上下两端的按钮
  */
  &::-webkit-scrollbar-button {
    height: 0;
    background-color: transparent;
  }
}

// 自定义proTable表格分页展示
.global-pagination-common {
  min-width: 30px !important;
  height: 30px !important;
  margin: 0 6px !important;
  line-height: 30px !important;
  text-align: center !important;
  border: 1px solid #ccc !important;
}

.ant-pagination-item {
  .global-pagination-common();
}

.ant-pagination-item-active {
  background-color: #1890ff !important;
  border: none !important;

  & > a {
    color: white !important;
  }
}

.ant-pagination-prev {
  .global-pagination-common();
}

.ant-pagination-next {
  .global-pagination-common();
}

// 全局覆盖proTable表格的样式
.ant-table-cell {
  padding: 16px !important;
}

.ant-card-body,
.ant-pro-card-body {
  padding: 0 !important;
}
